-- GENERATED SPELL FOR [Dragonmaw Shaman] --


function spell0_21720(pUnit, Event) --@Bloodlust,n/a--
pUnit:FullCastSpellOnTarget(6742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21720', 30346, 1)
end

function spell1_21720(pUnit, Event) --@Chain Heal,Heal--
pUnit:FullCastSpellOnTarget(14900,pUnit)
pUnit:RegisterEvent('Sorts_21720', 2500, 1)
end

function spell2_21720(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21720', 0, 1)
end

function Sorts_21720(pUnit, Event)
local choix_sorts_21720 = math.random(0, 2)
if choix_sorts_21720 == 0 then
pUnit:RegisterEvent('spell0_21720', 1, 1)
end
if choix_sorts_21720 == 1 then
pUnit:RegisterEvent('spell1_21720', 1, 1)
end
if choix_sorts_21720 == 2 then
pUnit:RegisterEvent('spell2_21720', 1, 1)
end
end

function mob21720_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21720', math.random(1500, 3000), 1)
end

function mob21720_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21720_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21720_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21720, 1, 'mob21720_Action')
RegisterUnitEvent(21720, 2, 'mob21720_Leave')
RegisterUnitEvent(21720, 3, 'mob21720_Kill')
RegisterUnitEvent(21720, 4, 'mob21720_Die')
